package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.twins.*;
import com.yanqu.road.entity.activity.twins.config.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class TwinsBusiness {

    /*配置*/
    public static Map<Integer, Map<Integer, TwinsKungFuConfig>> getKungFuConfigMap(int activityId) {
        return DaoHelper.getTwinsConfigDaoImpl().getKungFuConfigMap(activityId);
    }
    public static Map<Integer, TwinsKungFuCombConfig> getKungFuCombConfigMap(int activityId) {
        return DaoHelper.getTwinsConfigDaoImpl().getKungFuCombConfigMap(activityId);
    }
    public static Map<Integer, TwinsMissionConfig> getMissionConfigMap(int activityId) {
        return DaoHelper.getTwinsConfigDaoImpl().getMissionConfigMap(activityId);
    }
    public static Map<Integer, TwinsNpcConfig> getNpcConfigMap(int activityId) {
        return DaoHelper.getTwinsConfigDaoImpl().getNpcConfigMap(activityId);
    }
    public static Map<Integer, TwinsLotteryConfig> getLotteryConfigMap(int activityId) {
        return DaoHelper.getTwinsConfigDaoImpl().getLotteryConfigMap(activityId);
    }

    public static Map<Integer, TwinsPvpConfig> getPvpConfigMap(int activityId) {
        return DaoHelper.getTwinsConfigDaoImpl().getPvpConfigMap(activityId);
    }
    public static Map<Integer, TwinsMapConfig> getMapConfigMap(int activityId) {
        return DaoHelper.getTwinsConfigDaoImpl().getMapConfigMap(activityId);
    }


    /*数据*/
    public static TwinsUserData getUserData(long userId, int activityId) {
        return DaoHelper.getTwinsUserDataDaoImpl().getUserData(activityId, userId);
    }
    public static int getUserMaxMissionId(long userId) {
        return DaoHelper.getTwinsUserDataDaoImpl().getUserMaxMissionId(userId);
    }

    public static boolean addUserData(TwinsUserData userData) {
        return DaoHelper.getTwinsUserDataDaoImpl().add(userData);
    }

    public static boolean updateUserData(TwinsUserData userData) {
        return DaoHelper.getTwinsUserDataDaoImpl().update(userData);
    }


    /*跨服*/
    public static int getMaxBossNo(int activityId,int groupId){
        return DaoHelper.getCrossTwinsDaoImpl().getMaxBossNo(activityId,groupId);
    }

    public static int getMaxUserNo(int activityId,int groupId){
        return DaoHelper.getCrossTwinsDaoImpl().getMaxUserNo(activityId,groupId);
    }

    public static Map<Integer, CrossTwinsBossData> getBossDataList(int activityId,int groupId) {
        return DaoHelper.getCrossTwinsDaoImpl().getBossDataList(activityId,groupId);
    }

    public static boolean addBossDataList(List<CrossTwinsBossData> dataList){
        return DaoHelper.getCrossTwinsDaoImpl().addBossDataList(dataList);
    }
    public static boolean updateBossDataList(List<CrossTwinsBossData> dataList){
        return DaoHelper.getCrossTwinsDaoImpl().updateBossDataList(dataList);
    }


    public static Map<Long, CrossTwinsUserData> getUserDataList(int activityId,int groupId) {
        return DaoHelper.getCrossTwinsDaoImpl().getUserDataList(activityId,groupId);
    }

    public static boolean addUserDataList(List<CrossTwinsUserData> dataList){
        return DaoHelper.getCrossTwinsDaoImpl().addUserDataList(dataList);
    }
    public static boolean updateUserDataList(List<CrossTwinsUserData> dataList){
        return DaoHelper.getCrossTwinsDaoImpl().updateUserDataList(dataList);
    }

    public static List<CrossTwinsDamageRecordData> getDamageRecordDataList(int activityId,int groupId,List<Integer> bossNoList) {
        return DaoHelper.getCrossTwinsDaoImpl().getDamageRecordDataList(activityId,groupId,bossNoList);
    }

    public static boolean addDamageRecordDataList(List<CrossTwinsDamageRecordData> dataList){
        return DaoHelper.getCrossTwinsDaoImpl().addDamageRecordDataList(dataList);
    }
    public static boolean updateDamageRecordDataList(List<CrossTwinsDamageRecordData> dataList){
        return DaoHelper.getCrossTwinsDaoImpl().updateDamageRecordDataList(dataList);
    }

    //抽奖信息
    public static CrossTwinsLuckDrawData getCrossTwinsDrawData(int activityId,int groupId) {
        return DaoHelper.getCrossTwinsDrawDaoImpl().getData(activityId,groupId);
    }

    public static boolean addCrossTwinsDrawData(CrossTwinsLuckDrawData drawData) {
        return DaoHelper.getCrossTwinsDrawDaoImpl().add(drawData);
    }

    public static boolean updateCrossTwinsDrawData(CrossTwinsLuckDrawData drawData) {
        return DaoHelper.getCrossTwinsDrawDaoImpl().update(drawData);
    }
}
